package Day13.IO;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

public class Demo2 {

    public static void main(String[] args) throws IOException {
        FileOutputStream file = null;
        try {
            file = new FileOutputStream("D:\\B.txt");

//            System.out.println(10/0);
            file.write("江南".getBytes());

        }catch (IOException e){
            e.printStackTrace();
        }finally {
            if (file!=null){
                try {
                    file.close();
                }catch (IOException e){
                    e.printStackTrace();
                }

            }
        }
    }
}
